﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Bpms.Bll;

namespace Web.include
{
    public partial class leftControl : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.InitColumn();
        }

        /// <summary>
        /// 当前栏目
        /// </summary>
        public ColumnType CurrentColumn
        {
            get;
            set;
        }

        private void InitColumn()
        {
            switch (CurrentColumn)
            {
                case ColumnType.UserManagement:
                    this.literalUser.Visible = true;
                    this.literalCustomer.Visible = literalProject.Visible = literalPo.Visible = literalStatistics.Visible = literalGlobal.Visible = false;
                    break;
                case ColumnType.CustomerManagement:
                    this.literalCustomer.Visible = true;
                    this.literalUser.Visible = literalProject.Visible = literalPo.Visible = literalStatistics.Visible = literalGlobal.Visible = false;
                    break;
                case ColumnType.ProjectManagement:
                    this.literalProject.Visible = true;
                    this.literalUser.Visible = literalCustomer.Visible = literalPo.Visible = literalStatistics.Visible = literalGlobal.Visible = false;
                    break;
                case ColumnType.PoManagement:
                    this.literalPo.Visible = true;
                    this.literalUser.Visible = literalCustomer.Visible = literalProject.Visible = literalStatistics.Visible = literalGlobal.Visible = false;
                    break;
                case ColumnType.StatisticsManagement:
                    this.literalStatistics.Visible = true;
                    this.literalUser.Visible = literalCustomer.Visible = literalProject.Visible = literalPo.Visible = literalGlobal.Visible = false;
                    break;
                case ColumnType.GlobalManagement:
                    this.literalGlobal.Visible = true;
                    this.literalUser.Visible = literalCustomer.Visible = literalProject.Visible = literalPo.Visible = literalStatistics.Visible = false;
                    break;
                default:
                    break;
            }
        }
    }
}